package com.easa.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Timetable {
    private long cid;
    private String lessonName;
    private String tid;
    private String weekid;
    private Integer classNum;
    private Integer classLength;
    private String classDate;
    private Integer lid;
    private String applicationTime;
    private String applicationName;
    private Integer classClassify;
    private Integer weekday;
    private Integer batchNum;

    @Id
    @Column(name = "cid")
    public long getCid() {
        return cid;
    }

    public void setCid(long cid) {
        this.cid = cid;
    }

    @Basic
    @Column(name = "lessonName")
    public String getLessonName() {
        return lessonName;
    }

    public void setLessonName(String lessonName) {
        this.lessonName = lessonName;
    }

    @Basic
    @Column(name = "tid")
    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    @Basic
    @Column(name = "weekid")
    public String getWeekid() {
        return weekid;
    }

    public void setWeekid(String weekid) {
        this.weekid = weekid;
    }

    @Basic
    @Column(name = "classNum")
    public Integer getClassNum() {
        return classNum;
    }

    public void setClassNum(Integer classNum) {
        this.classNum = classNum;
    }

    @Basic
    @Column(name = "classLength")
    public Integer getClassLength() {
        return classLength;
    }

    public void setClassLength(Integer classLength) {
        this.classLength = classLength;
    }

    @Basic
    @Column(name = "classDate")
    public String getClassDate() {
        return classDate;
    }

    public void setClassDate(String classDate) {
        this.classDate = classDate;
    }

    @Basic
    @Column(name = "lid")
    public Integer getLid() {
        return lid;
    }

    public void setLid(Integer lid) {
        this.lid = lid;
    }

    @Basic
    @Column(name = "applicationTime")
    public String getApplicationTime() {
        return applicationTime;
    }

    public void setApplicationTime(String applicationTime) {
        this.applicationTime = applicationTime;
    }

    @Basic
    @Column(name = "applicationName")
    public String getApplicationName() {
        return applicationName;
    }

    public void setApplicationName(String applicationName) {
        this.applicationName = applicationName;
    }

    @Basic
    @Column(name = "classClassify")
    public Integer getClassClassify() {
        return classClassify;
    }

    public void setClassClassify(Integer classClassify) {
        this.classClassify = classClassify;
    }

    @Basic
    @Column(name = "weekday")
    public Integer getWeekday() {
        return weekday;
    }

    public void setWeekday(Integer weekday) {
        this.weekday = weekday;
    }

    @Basic
    @Column(name = "batchNum")
    public Integer getBatchNum() {
        return batchNum;
    }

    public void setBatchNum(Integer batchNum) {
        this.batchNum = batchNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Timetable timetable = (Timetable) o;

        if (cid != timetable.cid) return false;
        if (lessonName != null ? !lessonName.equals(timetable.lessonName) : timetable.lessonName != null) return false;
        if (tid != null ? !tid.equals(timetable.tid) : timetable.tid != null) return false;
        if (weekid != null ? !weekid.equals(timetable.weekid) : timetable.weekid != null) return false;
        if (classNum != null ? !classNum.equals(timetable.classNum) : timetable.classNum != null) return false;
        if (classLength != null ? !classLength.equals(timetable.classLength) : timetable.classLength != null)
            return false;
        if (classDate != null ? !classDate.equals(timetable.classDate) : timetable.classDate != null) return false;
        if (lid != null ? !lid.equals(timetable.lid) : timetable.lid != null) return false;
        if (applicationTime != null ? !applicationTime.equals(timetable.applicationTime) : timetable.applicationTime != null)
            return false;
        if (applicationName != null ? !applicationName.equals(timetable.applicationName) : timetable.applicationName != null)
            return false;
        if (classClassify != null ? !classClassify.equals(timetable.classClassify) : timetable.classClassify != null)
            return false;
        if (weekday != null ? !weekday.equals(timetable.weekday) : timetable.weekday != null) return false;
        if (batchNum != null ? !batchNum.equals(timetable.batchNum) : timetable.batchNum != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (cid ^ (cid >>> 32));
        result = 31 * result + (lessonName != null ? lessonName.hashCode() : 0);
        result = 31 * result + (tid != null ? tid.hashCode() : 0);
        result = 31 * result + (weekid != null ? weekid.hashCode() : 0);
        result = 31 * result + (classNum != null ? classNum.hashCode() : 0);
        result = 31 * result + (classLength != null ? classLength.hashCode() : 0);
        result = 31 * result + (classDate != null ? classDate.hashCode() : 0);
        result = 31 * result + (lid != null ? lid.hashCode() : 0);
        result = 31 * result + (applicationTime != null ? applicationTime.hashCode() : 0);
        result = 31 * result + (applicationName != null ? applicationName.hashCode() : 0);
        result = 31 * result + (classClassify != null ? classClassify.hashCode() : 0);
        result = 31 * result + (weekday != null ? weekday.hashCode() : 0);
        result = 31 * result + (batchNum != null ? batchNum.hashCode() : 0);
        return result;
    }
}
